#!/bin/bash

echo "jjjjjjjjjjjjjjjjjjjjjjjjjjjjj"
echo "'$MONGO_USERNAME'"
echo "'$MONGO_PASSWORD'"

mongo <<EOF

use test;
db.createUser(
  {
    user: 'mongo',
    pwd:  'mongo',
    roles: [ { role: "readWrite", db: 'test' } ]
  }
);


use collector;
db.createUser(
  {
    user: '$MONGO_USERNAME',
    pwd:  '$MONGO_PASSWORD',
    roles: [ { role: "readWrite", db: 'collector' } ]
  }
);

EOF
